<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>deferred.done(doneCallbacks[,doneCallbacks])</title>
<link type="text/css" rel="stylesheet" href="style/style.css" tppabs="http://www.erdangjiade.com/manual/jquery/jquery/style/style.css"  />
</head>
<body id="split">
<div id="content">
  <div rel="deferred.done">
    <h2><span>返回值:Deferred Object</span>deferred.done(doneCallbacks[,doneCallbacks])</h2>
    <h3>概述</h3>
    <div class="desc">
      <p>当延迟成功时调用一个函数或者数组函数.</p>
      <div class="longdesc">
        <p>该参数可以是一个函数或一个函数的数组。当延迟成功时，doneCallbacks被调用。回调执行是依照他们添加的顺序。一旦deferred.done()返回延迟对象，延迟对象的其它方法也可以链接到了这里，包括增加.done()方法。当延迟解决，doneCallbacks执行使用参数提供给<a href="deferred.reject.html" tppabs="http://www.erdangjiade.com/manual/jquery/jquery/deferred.reject.html">resolve</a>或<a href="deferred.rejectWith.html" tppabs="http://www.erdangjiade.com/manual/jquery/jquery/deferred.rejectWith.html">resolveWith</a>方法依照添加的顺序调用。有关详细信息，请参阅<a href="javascript:if(confirm('http://api.jquery.com/category/deferred-object/  \n\n该文件无法用 Teleport Ultra 下载, 因为 它是一个域或路径外部被设置为它的启始地址的地址。  \n\n你想在服务器上打开它?'))window.location='http://api.jquery.com/category/deferred-object/'" tppabs="http://api.jquery.com/category/deferred-object/">Deferred object</a> 。</p>
      </div>
    </div>
    <h3>参数</h3>
    <div>
      <h4><strong>doneCallbacks</strong><span>Function/Array</span><em>V1.5</em></h4>
      <p>一个函数或者数组函数，延迟成功时调用</p>
      <h4><strong>doneCallbacks</strong><span>Function/Array</span><em>V1.5</em></h4>
      <p>附加可选的函数或数组函数，延迟成功时调用</p>
    </div>
    <div class="example">
      <h3>示例</h3>
      <span id="f_ad2"></span>
      <h4>描述:</h4>
      <p>一旦jQuery.get方法返回一个来自延迟的对象的jqXHR对象，我们可以附加一个成功回调使用.done方法。</p>
      <h5>jQuery 代码:</h5>
      <pre><code>$.get("test.php").done(function() { 
  alert("$.get succeeded"); 
});</code></pre>
    </div>
  </div>
</div>
</body>
</html>
<div style="display:none">

<script type="text/javascript">
var _bdhmProtocol = (("https:" == document.location.protocol) ? " https://" : " http://");
document.write(unescape("%3Cscript src='" + _bdhmProtocol + "hm.baidu.com/h.js%3F327b016d332d3a7e4043796cab725707' type='text/javascript'%3E%3C/script%3E"));
</script>
</div>/